From 32562d7bec7518bd27c5d36efc70c80b9e799b79 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 21 Nov 2006 10:19:01 +0000 Subject: [PATCH] There is a somewhat trivial issue with XendCheckpoint.py right now in that it logs everything written to stderr by xc_save and xc_restore as errors whereas in fact the vast majority of this output is information/debug (and all actual errors are marked by the string ERROR: at the start of the message) -- this is confusing to folks looking at the logs and makes automated log analysis tricky. Fix is to scan for the ERROR: string and log anything without it using log.info instead. Signed-off by: Simon Graham --- tools/python/xen/xend/XendCheckpoint.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index e8894933fb..b16413f310 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -234,4 +234,9 @@ def slurp(infile): if line == "": break else: - log.error('%s', line.strip()) + line = line.strip() + m = re.match(r"^ERROR: (.*)", line) + if m is None: + log.info('%s', line) + else: + log.error('%s', m.group(1)) -- 2.30.2